# $Id: PKGBUILD 64746 2012-02-18 03:49:50Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Schnouki <thomas.jost@gmail.com>
# Contributor: devon <admin@patched.biz>

pkgname=dstat
pkgver=0.7.2
pkgrel=4
pkgdesc="A versatile resource statistics tool"
arch=('any')
url="http://dag.wieers.com/home-made/dstat/"
license=('GPL')
depends=('python2')
source=(http://dag.wieers.com/home-made/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('bfea4dc8037a0b18fc40a4dfc104dcc8')
sha1sums=('10baf061e3d38e1234fb99182fc53509adf07269')

build() {
  cd $srcdir/$pkgname-$pkgver

  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|g' dstat
  make DESTDIR=$pkgdir install

  cd docs
  for f in *.html *.txt; do
    install -Dm644 $f $pkgdir/usr/share/doc/$pkgname/$f
  done  
}
